const path = require('path');
const ManifestPlugin = require('webpack-manifest-plugin');
module.exports = {
  mode: 'development',
  entry: ['./src/index.js', './src/test.js'],
  // watch: true,
  output: {
    // path: __dirname + 'dist',
    // publicPath: '/dist/',
    filename: "bundle.js",
    chunkFilename: '[name].js'
  },
  module: {
    //   rules: [{
    //     test: /.jsx?$/,
    //     include: [
    //       path.resolve(__dirname, 'src')
    //     ],
    //     exclude: [
    //       path.resolve(__dirname, 'node_modules')
    //     ],
    //     loader: 'babel-loader',
    //     query: {
    //       presets: [
    //         ["@babel/env", {
    //           "targets": {
    //             "browsers": "last 2 chrome versions"
    //           }
    //         }]
    //       ]
    //     }
    //   }]
  },
  resolve: {
    extensions: ['.json', '.js', '.jsx']
  },
  devtool: 'source-map',
  plugins: [
    new ManifestPlugin()
  ]
  // devServer: {
  //   contentBase: path.join('/dist/'),
  //   inline: true,
  //   host: '0.0.0.0',
  //   port: 8080,
  // }
};